<template>
	<view class="SCharacter">
		<u-navbar title="个性推荐" back-icon-color="#fff" :background="background" title-color="#fff"></u-navbar>
		<view class="u-page">
			<view class="wrap">
				<u-swiper :list="swiperList" border-radius="10"></u-swiper>
			</view>
			<view class="func">
				<u-grid :col="2" :border="false">
						<u-grid-item @click="goPlayer">
							<u-icon name="server-man" :size="60"></u-icon>
							<view class="grid-text">私人FM</view>
						</u-grid-item>
						<u-grid-item @click="goSongList">
							<u-icon name="calendar-fill" :size="60"></u-icon>
							<view class="grid-text">每日推荐</view>
						</u-grid-item>
					</u-grid>
			</view>
			<view class="recommend">
				<view class="title">
					让你单曲循环的华语歌
				</view>
				<view class="songList">
					<view class="item" @click="goPlayer">
						<view class="left">
							<view class="box">
								<u-icon name="bookmark-fill"
								size="50"
								color="#fff"></u-icon>
							</view>
						</view>
						<view class="right">
							<text class="songName">我喜欢的12345</text>
							<text class="fuHao"> —— </text>
							<text class="personName">杨宗纬</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { mapState } from "vuex"
	export default {
		data() {
			return {
				background: {},
				swiperList: [{
						image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
						title: '昨夜星辰昨夜风，画楼西畔桂堂东'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
						title: '身无彩凤双飞翼，心有灵犀一点通'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
						title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'
					}
				],
			}
		},
		computed: {
			...mapState({
				commonColor: ({config})=>config.commonColor,
			})
		},
		methods: {
			goPlayer() {
				this.$Router.push({
					name: 'player'
				})
			},
			goSongList() {
				this.$Router.push({
					name: 'SongList'
				})
			}
		},
		created() {
			this.background["backgroundColor"] = this.commonColor;
		}
	}
</script>

<style lang="less" scoped>
/deep/ .u-grid-item-box {
	padding: 50rpx 0 !important;
}
/deep/ .u-icon__icon {
	color: #d43c33;
}
.SCharacter {
	display: flex;
	flex-direction: column;
	height: 100%;
	.u-page {
		flex: 1;
		overflow: hidden;
		padding: 20rpx;
		.wrap {}
		.func {
			margin: 20rpx 0;
			border-radius: 10rpx;
			overflow: hidden;
		}
		.recommend {
			background-color: #fff;
			padding: 20rpx;
			border-radius: 10rpx;
			.title {
				padding: 20rpx 0;
				font-size: 35rpx;
				letter-spacing: 5rpx;
			}
			.songList {
				width: 100%;
				.item {
					display: flex;
					align-items: center;
					width: 100%;
					padding: 20rpx 0;
					.left {
						padding: 0 20rpx;
						.box {
							display: flex;
							justify-content: center;
							align-items: center;
							width: 80rpx;
							height: 80rpx;
							background-color: #000;
							opacity: .1;
							border-radius: 10rpx;
						}
					}
					.right {
						font-size: 30rpx;
						letter-spacing: 3rpx;
						.songName {}
						.fuHao {
							padding: 0 20rpx;
						}
						.personName {
							font-size: 20rpx;
							color: #999;
						}
					}
				}
			}
		}
	}
}
</style>
